unit UNMHistoricoClass;

interface
uses
  SysUtils, Classes, UNMFunctionUtils, UNMSysConfigClass, UNMEnumeradores, SqlExpr;

type
  THistorico = class(TPersistent)
    private
      fHistoricoID: Integer;
      fEmpresaID: Integer;
      fData: TDateTime;
      fDescricao: string;
      fTipo: TTipoHistorico;
    published
      property HistoricoID: Integer read fHistoricoID write fHistoricoID;
      property EmpresaID: Integer read fEmpresaID write fEmpresaID;
      property Data: TDateTime read fData write fData;
      property Descricao: string read fDescricao write fDescricao;
      property Tipo: TTipoHistorico read fTipo write fTipo;
    public
      constructor Create;
  end;

  THistoricoDB = class( THistorico )
    private
      fConnection: TSQLConnection;
      fTableConfig: TTableHistorico;
    published
      property Connection: TSQLConnection read fConnection write fConnection;
      property TableConfig: TTableHistorico read fTableConfig write fTableConfig;
    public
      constructor Create(PConnection: Pointer; PTable: TTableHistorico);
      function Carregar(PHistoricoID: Integer; const PEmpresaID: Integer = 0): Boolean;

  end;


implementation

{ TTableHistorico }



{ THistorico }

constructor THistorico.Create;
begin
  fHistoricoID := 0;
  fEmpresaID   := 0;
  fData        := Now;
  fDescricao   := '';
  fTipo        := thAviso;
end;

{ THistoricoDB }

function THistoricoDB.Carregar(PHistoricoID: Integer; const PEmpresaID: Integer): Boolean;
begin

end;

constructor THistoricoDB.Create(PConnection: Pointer; PTable: TTableHistorico);
begin

end;

end.
